package com.ruoyi.property.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.property.mapper.FeeReceiptManageInfoMapper;
import com.ruoyi.property.domain.FeeReceiptManageInfo;
import com.ruoyi.property.service.IFeeReceiptManageInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 补打收据Service业务层处理
 * 
 * @author sux
 * @date 2021-06-30
 */
@Service
public class FeeReceiptManageInfoServiceImpl implements IFeeReceiptManageInfoService 
{
    @Autowired
    private FeeReceiptManageInfoMapper feeReceiptManageInfoMapper;

    /**
     * 查询补打收据
     * 
     * @param receiptId 补打收据ID
     * @return 补打收据
     */
    @Override
    public FeeReceiptManageInfo selectFeeReceiptManageInfoById(Long receiptId)
    {
        return feeReceiptManageInfoMapper.selectFeeReceiptManageInfoById(receiptId);
    }

    /**
     * 查询补打收据列表
     * 
     * @param feeReceiptManageInfo 补打收据
     * @return 补打收据
     */
    @Override
    public List<FeeReceiptManageInfo> selectFeeReceiptManageInfoList(FeeReceiptManageInfo feeReceiptManageInfo)
    {
        return feeReceiptManageInfoMapper.selectFeeReceiptManageInfoList(feeReceiptManageInfo);
    }

    /**
     * 新增补打收据
     * 
     * @param feeReceiptManageInfo 补打收据
     * @return 结果
     */
    @Override
    public int insertFeeReceiptManageInfo(FeeReceiptManageInfo feeReceiptManageInfo)
    {
        feeReceiptManageInfo.setCreateTime(DateUtils.getNowDate());
        return feeReceiptManageInfoMapper.insertFeeReceiptManageInfo(feeReceiptManageInfo);
    }

    /**
     * 修改补打收据
     * 
     * @param feeReceiptManageInfo 补打收据
     * @return 结果
     */
    @Override
    public int updateFeeReceiptManageInfo(FeeReceiptManageInfo feeReceiptManageInfo)
    {
        return feeReceiptManageInfoMapper.updateFeeReceiptManageInfo(feeReceiptManageInfo);
    }

    /**
     * 删除补打收据对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFeeReceiptManageInfoByIds(String ids)
    {
        return feeReceiptManageInfoMapper.deleteFeeReceiptManageInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除补打收据信息
     * 
     * @param receiptId 补打收据ID
     * @return 结果
     */
    @Override
    public int deleteFeeReceiptManageInfoById(Long receiptId)
    {
        return feeReceiptManageInfoMapper.deleteFeeReceiptManageInfoById(receiptId);
    }
}
